<!doctype html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml" xmlns:v-on="http://www.w3.org/1999/xhtml" xmlns:v-model="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        .my-transition-enter-active {
            animation: bounce-in 0.5s;
        }
        .my-transition-leave-active {
            animation:bounce-in 0.5s reverse;
        }
        @keyframes bounce-in {
            0% {
                transform: scale(0);
            }
            50% {
                transform: :scale(1.5);
            }
            100% {
                transform: scale(1);
            }
        }
    </style>
</head>
<body>

<div id="app">

    <my-component></my-component>
</div>


</body>
<script src="../../vender/vue@2.4.2.js"></script>
<script>
    var app=new Vue({
        el:'#app',
        components:{
            myComponent:{
                template:`<div>
                    <button @click="show=!show">Toggle</button>
                    <transition name="my-transition">
                        <p v-if="show">show:{{show}}</p>
                    </transition>
                </div>`,
                data:function(){
                    return {
                        show:true
                    }
                }
            }
        }
    });



</script>
</html>